//
//  Model.m
//  UI考试_团购应用
//
//  Created by lanou3g on 15-3-23.
//  Copyright (c) 2015年 胡航. All rights reserved.
//

#import "Model.h"
#import "UIImage+ImageDownLoader.h"

@implementation Model

-(void)setValue:(id)value forKey:(NSString *)key;
{
    if ([key isEqualToString:@"title"]) {
        self.title=value;
    }else if ([key isEqualToString:@"description"]){
        self.content=value;
    }else if ([key isEqualToString:@"image_url"]){
        self.image_url=value;
    }
}

-(void)loadImage
{
    __unsafe_unretained typeof(self) weakSafe = self;

     [UIImage imageDownLoaderWithPicUrlStr:_image_url ImageBlock:^(UIImage *img) {
         weakSafe.MyImage = img;
         
         _isLoading = NO;
     }];

    _isLoading = YES;

}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{


}


@end
